<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#idWorkContent {
				display: flex;
				align-items: center;
			}

			#idAddWork {
				display: flex;
				justify-content: flex-end;
			}
		</style>
	</head>
	<body>
		<div id="">
			<h3>工作经历</h3>
			<hr>
			<div id="workAll"></div>
			<div id="idAddWork">
				<a href="#" onclick="addWork()">添加工作经历</a>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		function delWork(event) 
		{
			//获取
			var workAllObj = document.getElementById('workAll');
			//找到需要删除的目标
			var delTarget = event.target.parentElement;
			workAllObj.removeChild(delTarget);
		}

		function addWork()
		{
			//获取
			var workAllObj = document.getElementById('workAll');
			//创建一个新的div
			var newDiv = document.createElement('div');
			newDiv.innerHTML =
				`公司名称：<input type="" name="" id="" value="" />
								职位：<input type="" name="" id="" value="" />
								<a href="#" onclick="delWork(event)">删除工作经历</a>
								<br><br>
								<div id="idWorkContent">
								工作职责及工作内容描述:<textarea rows="8" cols="100">
								</textarea>
								</div>
								<hr >`
			workAllObj.appendChild(newDiv);
		}
		onload = function()
		{
			addWork();
		}
	</script>
</html>